  <% codelist.forEach(function(item){ %>
		<div class="itembox<% if(item.inventory==0 || (item.inventory>0 && item.todaySurplusNum<1) ){ %> invalid<% } %>">
			<div class="row">
				<div class="infobox">
					<div class="title"><%= item.title %></div>
					<div class="rule"><% if(item.type==1){ %><% if(item.money==0){ %>无使用门槛<% }else{ %>满<%= round(item.money) %>元可用<% } %><% } %> | <% if(item.goods==1){ %>全部商品<% }else{ %>指定商品<% } %></div>
					<div class="usetime">有效期:<%= date('Y.m.d',item.startTime).replace(/-/g,".") %>至<%= date('Y.m.d',item.endTime).replace(/-/g,".") %></div>
				</div>
				<div class="pricebox">
				<% if(item.inventory==0){ %>
					<button type="button" class="receive-btn disabled" data-cardid="<%= item.cardId %>">已领完</button>
				<% }else if(item.inventory>0 && item.todaySurplusNum<1){ %>
					<button type="button" class="receive-btn disabled" data-cardid="<%= item.cardId %>">已领取</button>
				<% }else{ %>
					<button type="button" class="receive-btn" data-cardid="<%= item.cardId %>">立即领取</button>
				<% } %>
				</div>
			</div>
		</div>
  <% }) %> 


				